<div class="row dialog">
    <div class="col-md-12">
        <div class="card">
            <div class="card-header card-header-inverse">
                <h4 class="card-header-title">
                    编辑
                </h4>
            </div>
            <div class="card-content">
                <form class="pageForm" method="post" action="<?= \yii\helpers\Url::to([yii::$app->view->params['name'].'/role/create'])?>" data-validator-option="{theme: 'yellow_top',timely:2, focusCleanup:true}">
                    <div class="row">&nbsp;</div>
                    <div class="row">
                        <div class="col-md-12">
                            <div class="form-group label-floating is-empty is-info">
                                <label class="control-label">系统类型</label>
                                <?php if (empty($groupId)) : ?>
                                <select name="GroupId" class="form-control form-control-sm" data-style="select-with-transition" data-size="7" data-val="<?= @$role['Id']?>">
                                    <option value="1">管理系统</option>
                                    <option value="2">代理系统</option>
                                </select>
                                <?php else:?>
                                    <input type="hidden" name="GroupId" value="<?= $groupId?>" readonly>
                                    <input type="text" class="form-control form-control-sm" value="<?= ($groupId == 1) ? '管理系统' : '代理系统' ?>" readonly>
                                <?php endif;?>
                            </div>
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-md-12">
                            <div class="form-group label-floating is-empty is-info">
                                <label class="control-label">角色名称</label>
                                <input type="text" name="RoleName" class="form-control form-control-sm" data-rule="角色名称:required;length(2~8)" value="<?= @$role['RoleName']?>" maxlength="8">
                            </div>
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-md-12">
                            <div class="form-group label-floating is-empty is-info">
                                <label class="control-label">备注描述</label>
                                <input type="text" name="Remarks" class="form-control form-control-sm" value="<?= @$role['Remarks']?>">
                            </div>
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-md-12">
                            <div class="form-group label-floating is-empty is-info">
                                <div class="checkbox">
                                    <input type="checkbox" name="Nullity" id="Nullity" value="<?= @$role['Nullity']?>">
                                    <label for="Nullity">
                                        是否启用
                                    </label>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-md-12">
                            <div class="form-group label-floating is-empty is-info">
                                <input type="hidden" name="RoleId" value="<?= @$role['Id']?>" />
                                <button type="submit" class="btn btn-fill btn-primary pull-right">确认提交</button>
                            </div>
                        </div>
                    </div>

                    <div class="clearfix"></div>
                </form>
            </div>
        </div>
    </div>
</div>